package se.webbzon.boltzmann.battle.battleaction.projectile;

import se.webbzon.boltzmann.battle.object.npc.BattleNPC;
import se.webbzon.boltzmann.item.AbstractItem;
import se.webbzon.oschi01.worldobject.appearance.Appearance3D;
import se.webbzon.oschi01.worldobject.appearance.SimpleAppearance3D;
import se.webbzon.oschi01.worldobject.appearance.XYPlaneAppearance3D;

public class ItemBattleProjectile extends AbstractBattleProjectile {
	
	// The time (# of steps) until impact
	private static final int duration = 30;
	
	// The vertical acceleration of this projectile
	private static final double acceleration = -0.5;
	
	/*============================================================
	Constructors
	============================================================*/

	public ItemBattleProjectile(AbstractItem item, BattleNPC target) {
		super(target, duration, acceleration, createAppearance(item));
	}
	
	/*============================================================
	Private Methods
	============================================================*/
	
	/** Creates the appearance for this projectile. **/
	private static final Appearance3D createAppearance(AbstractItem item) {
		SimpleAppearance3D appearance = new XYPlaneAppearance3D();
		appearance.setTextureSet(item.getTextureSet());
		return appearance;
	}

}
